<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/2/22 0022
 * Time: 21:43
 */

namespace app\common\validate;

use think\Validate;

class Admin extends Validate
{
    protected $rule = [
        'username|用户名' => 'require|length:4,10',
        'password|密码' => 'require|length:4,10',
        'verify|验证码' => 'require|captcha'
    ];

    protected $scene = [
        'login' => ['username', 'password', 'verify']
    ];

    /*public function sceneLogin()
    {
        return $this->only(['username', 'password', 'verify']);
    }*/
}